<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<title>锁定与滑动页面</title>
</head>
<body>
<style>
*{margin:0;padding:0;}
</style>
滚起来111111
<br><br><br>
<br><br><br>
<br><br><br>
滚起来222222
<br><br><br>
<br><br><br>
<br><br><br>
滚起来333333
<br><br><br>
<br><br><br>
<br><br><br>
滚起来444444
<br><br><br>
<br><br><br>
<br><br><br>
滚起来555555
<br><br><br>
<br><br><br>
<br><br><br>
滚起来666666
<br><br><br>
<br><br><br>
<br><br><br>
滚起来777777
<br><br><br>
<br><br><br>
<br><br><br>
滚起来888888
<br><br><br>
<br><br><br>
<br><br><br>
滚起来999999
<br><br><br>
<br><br><br>
<br><br><br>
滚起来000000
<br><br><br>
<div id="toLock" style="color:#f00;font-size:20px;">点我锁定屏幕</div>
<br><br><br>
<br><br><br>
滚起来aaaaaa
<br><br><br>
<br><br><br>
<br><br><br>
滚起来bbbbbb
<br><br><br>
<br><br><br>
<br><br><br>
滚起来cccccc
<br><br><br>
<br><br><br>
<br><br><br>
滚起来dddddd
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
<br><br><br>
不用滚了,到底了eeeeeee
<button style="position:fixed;top:20px;right:10px;" id="unLock">点我解除屏幕锁定</button>
<script>
document.getElementById('toLock').addEventListener('click', function () {
    wsjScrollLock()
}, false)

document.getElementById('unLock').addEventListener('click', function () {
    wsjScrollLock(false)
}, false)
</script>
<script src="scrollLock.js"></script>
</body>
</html>